﻿
#发邮件模板

$附件 = Get-ChildItem '/tmp/aaaa.tar.gz'
$HTML邮件内容 = @'
<!doctype html>  
<html>  
<head>  
<meta charset="utf-8">  
</head>  
<body>  
<p>
	<span style="font-family:Microsoft YaHei;font-size:18px;">html信件内容</span>
</p>
</body>  
</html>  
'@

Send-MailMessage   `
-Subject "主题"       `
-From  "你的hotmail账户@hotmail.com" `
-To  "你的qq邮箱@qq.com"   `
-SmtpServer   "smtp.live.com"  -Port 587  -UseSsl    -Credential  "你的hotmail账户@hotmail.com"  `
-BodyAsHTML -body $HTML邮件内容 #`
# -Attachments $附件 